From 2e2e3980ab78052be74f4007c343e69a583648fe Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Thu, 10 Oct 2024 22:30:18 -0400
Subject: Compute the active channel from the current routing state, not from a
 store.

---
 ui/routes/(app)/ch/[channel]/+page.svelte | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

(limited to 'ui/routes/(app)/ch/[channel]/+page.svelte')

diff --git a/ui/routes/(app)/ch/[channel]/+page.svelte b/ui/routes/(app)/ch/[channel]/+page.svelte
index ef439d0..7bd28d9 100644
--- a/ui/routes/(app)/ch/[channel]/+page.svelte
+++ b/ui/routes/(app)/ch/[channel]/+page.svelte
@@ -1,17 +1,10 @@
 <script>
-    import { afterNavigate } from '$app/navigation';
     import { page } from '$app/stores';
-
-    import { activeChannel } from '$lib/store';
     import ActiveChannel from '$lib/components/ActiveChannel.svelte';
 
-    afterNavigate(async () => {
-        let { channel } = $page.params;
-        activeChannel.update((value) => {
-            value.set(channel)
-            return value;
-        });
-    });
+    $: channel = $page?.params?.channel;
 </script>
 
-<ActiveChannel />
+<div class="active-channel">
+    <ActiveChannel {channel} />
+</div>
-- 
cgit v1.2.3

